<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "attribute".
 *
 * @property int $attr_id 自增ID
 * @property int $merchant_id 商户ID
 * @property int $goods_id 商户ID
 * @property string $attr_name 属性名称
 *
 * @property GoodsAttribute[] $goodsAttributes
 */
class Attribute extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'attribute';
    }

    /**
     * Gets query for [[GoodsAttributes]].
     *
     * @return \yii\db\ActiveQuery
     */
    public function getGoodsAttributes()
    {
        return $this->hasMany(GoodsAttribute::className(), ['attr_id' => 'attr_id']);
    }
}
